<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.io.*,java.util.*,java.text.*" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="JavaScript" type="text/javascript">
function doValidation() {
	 var comments = document.getElementById("comments").value;
	 if (comments=="")
		{
		alert("Please add comments!!");
		return false;
		}
	 return true;
}
</script>
<title>View Ticket Details</title>
</head>
<body>
<h2>Ticket Details</h2>
<s:form action="supportView_ticketDetails" >
<s:hidden name="id" value="%{id}"/>
<table id="text">
<tr><td>Ticket No:</td><td><s:property value="id"/></td></tr>
<tr><td>Date:</td><td> <s:property value="date"/></td></tr>
<tr><td>Issued by:</td><td> <s:property value="cust_name"/></td></tr>
<tr><td>Contact no:</td><td> <s:property value="phone"/></td></tr>
<tr><td>E-mail:</td><td> <s:property value="email"/></td></tr>
<tr><td>Department:</td><td> <s:property value="dept"/></td></tr>
<tr><td>Office:</td><td> <s:property value="office"/></td></tr>
<tr><td>Computer/Device used:</td><td> <s:property value="device"/></td></tr>
<tr><td>Operating System:</td><td> <s:property value="os"/></td></tr>
<tr><td>Category:</td><td> <s:property value="category"/></td></tr>
<tr><td>Problem Summary:</td><td> <s:property value="summary"/></td></tr>
<tr><td>Description:</td><td> <s:property value="desc"/></td></tr>
<tr><td>Comments:</td><td><s:textarea name="comments" value="" id="comments"/></td></tr>
</table>
<br>
<input type="submit" name="commandbutton" value="SubmitResponse" id="mysubmit" onClick="return doValidation()" />
<s:if test="%{rolename=='Support_Executive 1' || rolename=='Support_Executive 2'}">
<input type="submit" name="commandbutton" value="Forward Ticket to Next Level" id="mysubmit" onClick="return doValidation()"/>
</s:if>
</s:form>
<br><br><center>
<s:form action="logout" align="center">
<s:submit name = "submit" value="SignOut"/>
</s:form>
</center>
</body>
</html>